<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<html>
	<f:subview id="EditalProjeto">

		<style>
			ul
			{
				list-style-type: none;
			}
		</style>

	    <h:panelGroup id="editalProjeto">
			
				<rich:dataList var="aviso" value="#{AvisoListagemMB.listaAvisos}" rows="10">

					<br />
					<table border="0" cellpadding="0" cellspacing="0" style="width:600px; border: 1px solid #c4c0b9">
			            <tr>
			                <td style="width: 130px; border-right: 1px solid #c4c0b9" valign="top">
			                    
			                    <table style="width: 100%;" border="0" cellpadding="0" cellspacing="0">
			                        <tr>
			                            <td style="width: 50px">
			                                &nbsp;<h:outputText value="Autor:" />
			                            </td>
			                            <td>
			                                <h:outputText value="#{aviso.autorAvi}" />
			                            </td>
			                        </tr>
			                        <tr>
			                            <td style="width: 50px">
			                                &nbsp;<h:outputText value="Data:" />
			                            </td>
			                            <td>
			                                <h:outputText value="#{aviso.dataAvi}">
			                                	<f:convertDateTime type="date" pattern="dd/MM/yyyy" dateStyle="medium" />
					                        </h:outputText>
			                            </td>
			                        </tr>
			                        <tr>
			                            <td colspan="2" align="right">
			                                <h:panelGrid columns="2" style="vertical-align: top">

												<a4j:htmlCommandLink action="#{AvisoListagemMB.redirect}" actionListener="#{AvisoListagemMB.editar}">
													<h:graphicImage id="imgEdt" url="/imagens/btlEdit.png" style="border:0" />
													<f:param id="IdAviEdt" name="IdAviEdt" value="#{aviso.idAvi}" />
												</a4j:htmlCommandLink>
												
												<h:commandLink actionListener="#{AvisoListagemMB.excluir}">
													<h:graphicImage id="imgDel" url="/imagens/btlDelete.png" style="border:0" />
													<f:param id="IdAviDel" name="IdAviDel" value="#{aviso.idAvi}" />
												</h:commandLink>
													
									        </h:panelGrid>
			                            </td>
			                        </tr>
			                    </table>
			                    
			                </td>
			                <td valign="top">
			                    <table style="width: 100%;" border="0" cellpadding="0" cellspacing="0">
			                        <tr>
			                            <td style="padding-left: 3px; text-align: left; width: 50px">
			                                &nbsp;<h:outputText value="Titulo:" />
			                            </td>
			                            <td style="text-align: left">
			                                <b><h:outputText value="#{aviso.tituloAvi}" /></b>
			                            </td>
			                        </tr>
			                        <tr>
			                            <td colspan="2" style="padding-left: 4px; padding-top: 3px; text-align: left">
			                                <h:outputText value="#{aviso.mensagemAvi}" />
			                            </td>
			                        </tr>
			                    </table>
			                </td>
			            </tr>
			        </table>
		        </rich:dataList>

				<div align="right" style="padding-bottom: 10px; padding-right: 10px">
					<h:commandButton id="btnNovoAviso" value="Novo Aviso" action="#{AvisoListagemMB.redirect}" />
				</div>
				
		</h:panelGroup>
	
    </f:subview>
</html>